<!DOCTYPE html>
<html>
	<head th:replace="/mobile/common::head(~{::custom_settings})">
		<th:block th:fragment="custom_settings">
			<title>顺山科技智慧生活服务平台</title>
			<link type="text/css" rel="stylesheet" th:href="@{{css}/mobile/member/mobileshoppingcart/mobileAddressAdd.css(css=${css})}"/>
			<!-- <script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/city-picker.min.js"></script> -->
			<link type="text/css" rel="stylesheet" th:href="@{{css}/mobile/member/mobileshoppingcart/ydui/ydui.css(css=${css})}"/>
			<script type="text/javascript" th:src="@{{js}/mobile/member/mobileshoppingcart/ydui/ydui.flexible.js(js=${js})}"></script>
			<script th:inline="javascript">
				var $entityid = '[[${entityid}]]';
			</script>
		</th:block>
	</head>
	<body>
		<div class="weui-tab">
			<div class="weui-tab__bd">
			    <div class="weui-tab-title-shopping"><i class="fa fa-angle-left"></i><h1>添加新地址</h1><span onclick="addressAdd.save();">保存</span></div>
		    </div>
		    <div class="weui-jd-qrdd-bigbox">
		    	<div class="weui-cells">
			      <div class="weui-cell">
			        <div class="weui-cell__bd">
			          <input class="weui-input" type="text" placeholder="请输入收货人姓名" id="username">
			        </div>
			      </div>
			    </div>
		    	<div class="weui-cells">
			      <div class="weui-cell weui-cell_select weui-cell_select-before">
			        <div class="weui-cell__bd">
			          <input class="weui-input" type="text"  placeholder="请输入收货人号码" id="userphone">
			        </div>
			      </div>
			    </div>
			    <div class="weui-cells">
			      <div class="weui-cell weui-cell_select weui-cell_select-before">
			        <div class="weui-cell__bd">
			          <input class="weui-input" type="text" readonly id="J_Address" placeholder="请选择收货地址">
			          <!-- <input class="weui-input" type="text" placeholder="所在地区" id="region" value="重庆 重庆市 万州区"> -->
			          <script>
    
					    /**
					     * 设置默认值
					     */
					    !function () {
					        var $target = $('#J_Address');
							$target.val('重庆市 重庆市 江北区 华新街');
					
					        $target.citySelect({
					        	country: '重庆市',
					            provance: '重庆市',
					            city: '江北区',
					            area: '华新街',
					            id: '5353873674985472-5358137277276160-24264402455633920-24264501306990592'
					        });
					
					        $target.on('click', function (event) {
					            event.stopPropagation();
					            $target.citySelect('open');
					        });
					
					        $target.on('done.ydui.cityselect', function (ret) {
					            $(this).val(ret.country + ' ' + ret.provance + ' ' + ret.city + ' ' + ret.area);
					        });
					    }();
					</script>
			        </div>
			        <div class="weui-cell__hd">
			          <select class="weui-select" >
			           
			          </select>
			        </div>
			      </div>
			    </div>
			    <div class="weui-cells weui-cells_form">
			      <div class="weui-cell">
			        <div class="weui-cell__bd">
			          <textarea class="weui-textarea" placeholder="详细地址：如道路、门牌号、小区、楼栋号、单元室等" rows="3" id="detailed" maxlength="200"></textarea>
			          <div class="weui-textarea-counter"><span id="number">0</span>/200</div>
			        </div>
			      </div>
			    </div>
			    
			    <div class="weui-peis-xz">
		    		<div class="weui-kuaid" autoClose="false"><p>配送方式</p><span class="open-popup" data-target="#half"><em id="deliverymode">请选择</em><i class="fa fa-angle-right"></i></span><input type="hidden" id="deliverymode_val" /></div>
		    		<!-- <div class="weui-kuaid"><p>发票信息</p><span class="open-popup" data-target="#half-modal"><em id="invoices">请选择</em><i class="fa fa-angle-right"></i></span><input type="hidden" id="invoices_val" /></div> -->
		    		<div class="weui-kuaid" style="border-bottom:none;"><p>支付方式</p><span class="open-popup" data-target="#pay-modal"><em id="paymentmode">请选择</em><i class="fa fa-angle-right"></i></span><input type="hidden" id="paymentmode_val" /></div>
		    	</div>
			    
			    <div class="weui-cells weui-cells_form weui-cells-wtc">
				  <div class="weui-cell weui-cell_switch">
				    <div class="weui-cell__bd">设为默认地址</div>
				    <div class="weui-cell__ft">
				      <input class="weui-switch" type="checkbox" id="checkboxClick">
				    </div>
				  </div>
				</div>
		    </div>
	    </div>
	    
	    <div id="half" class='weui-popup__container popup-bottom'>
	   	  <div class="weui-popup__overlay"></div>
	      <div class="weui-popup__modal">
	        <div class="toolbar">
	          <div class="toolbar-inner">
	            <a href="javascript:;" class="picker-button close-popup"><i class="weui-icon-cancel"></i></a>
	            <h1 class="title">配送方式</h1>
	          </div>
	        </div>
	        <div class="weui-cells weui-cells_radio">
		      <label class="weui-cell weui-check__label" for="deliverymode1">
		        <div class="weui-cell__bd">
		          <p>自提</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" class="weui-check" name="radio1" id="deliverymode1" checked="checked" deliverymode="deliverymode">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <label class="weui-cell weui-check__label" for="deliverymode2">
		        <div class="weui-cell__bd">
		          <p>市场配送</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" name="radio1" class="weui-check" id="deliverymode2" deliverymode="deliverymode">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <a href="javascript:addressAdd.clickDeliverymode();" class="weui-btn weui-btn_primary close-popup">完成</a>
		    </div>
	      </div>
       </div>
       
       <!-- <div id="half-modal" class='weui-popup__container popup-bottom'>
	   	  <div class="weui-popup__overlay"></div>
	      <div class="weui-popup__modal">
	        <div class="toolbar">
	          <div class="toolbar-inner">
	            <a href="javascript:;" class="picker-button close-popup"><i class="weui-icon-cancel"></i></a>
	            <h1 class="title">发票信息</h1>
	          </div>
	        </div>
	        <div class="weui-cells weui-cells_radio">
		      <label class="weui-cell weui-check__label" for="x16">
		        <div class="weui-cell__bd">
		          <p>电子发票</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" class="weui-check" name="radio1" id="x16" invoices="invoices">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <label class="weui-cell weui-check__label" for="x17">
		        <div class="weui-cell__bd">
		          <p>普通发票</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" name="radio1" class="weui-check" id="x17" invoices="invoices">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <a href="javascript:addressAdd.clickInvoices();" class="weui-btn weui-btn_primary close-popup">完成</a>
		    </div>
	      </div>
       </div> -->
       
       <div id="pay-modal" class='weui-popup__container popup-bottom'>
	   	  <div class="weui-popup__overlay"></div>
	      <div class="weui-popup__modal">
	        <div class="toolbar">
	          <div class="toolbar-inner">
	            <a href="javascript:;" class="picker-button close-popup"><i class="weui-icon-cancel"></i></a>
	            <h1 class="title">支付方式</h1>
	          </div>
	        </div>
	        <div class="weui-cells weui-cells_radio">
		      <label class="weui-cell weui-check__label" for="paymentmode1">
		        <div class="weui-cell__bd">
		          <p>微信</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" class="weui-check" name="radio1" id="paymentmode1" paymentmode="paymentmode">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <label class="weui-cell weui-check__label" for="paymentmode2">
		        <div class="weui-cell__bd">
		          <p>支付宝</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" name="radio1" class="weui-check" id="paymentmode2" paymentmode="paymentmode">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <label class="weui-cell weui-check__label" for="paymentmode3">
		        <div class="weui-cell__bd">
		          <p>银联</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" name="radio1" class="weui-check" id="paymentmode3" paymentmode="paymentmode">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <a href="javascript:addressAdd.clickPaymentmode();" class="weui-btn weui-btn_primary close-popup">完成</a>
		    </div>
	      </div>
       </div>
    <script type="text/javascript" th:src="@{{js}/mobile/member/mobileshoppingcart/ydui/ydui.js(js=${js})}"></script>
    <script type="text/javascript" th:src="@{{js}/mobile/member/mobileshoppingcart/mobileAddressAddHandler.js(js=${js})}"></script>
    </body>
</html>